package com.etc.result;

import lombok.Data;

/**
 * @Author : DDS
 * @Description : 异常常量
 * @Date: 2019-11-29 17:50
 */
@Data
public class CodeMessage {

    private int code;
    private String massage;

    //添加异常常量 5001XX
    public static CodeMessage SAVE_DEFEATED = new CodeMessage(500100, "添加失败");

    //删除异常常量 5002XX
    public static CodeMessage DELETE_DEFEATED = new CodeMessage(500200, "删除失败");

    //更新异常常量 5003XX
    public static CodeMessage UPDATE_DEFEATED = new CodeMessage(500300, "更新失败");

    //Excel异常常量 5004XX
    public static CodeMessage FIND_DEFEATED = new CodeMessage(500400, "查询失败");

    //Excel异常常量 5005XX
    public static CodeMessage UPLOAD_DEFEATED = new CodeMessage(500500, "上传Excel失败");
    public static CodeMessage DOWN_DEFEATED = new CodeMessage(500501, "下载Excel失败");

    //登录模块  2XX
    public static CodeMessage LOGIN_SUCCESS = new CodeMessage(200, "登录成功");
    public static CodeMessage NULL_LOGIN_NAME = new CodeMessage(201, "用户名不存在");
    public static CodeMessage LOGIN_ERROR = new CodeMessage(202, "登录失败");

    public CodeMessage(int code, String massage) {
        this.code = code;
        this.massage = massage;
    }

}
